﻿using ProjScan.RecordManager;
using ProjScan.RecordManager.AssetData;
using ProjScan.ScanRule.Attr;
using UnityEngine;

namespace ProjScan.ScanRule.ProjectAssets.Prefab
{
    [PrefabRuleAttr]
    internal class PS_MeshRW : RecordRuleImp<ParticleSystemAssetData, ParticleSystemRecordManager>
    {
        protected override bool IsOK(ParticleSystemAssetData assetData)
        {
            if (assetData.renderMode == ParticleSystemRenderMode.Mesh)
            {
                return assetData.isMeshReadable;
            }

            return true;
        }
    }
}